package com.qf.controller;

import com.qf.pojo.Test;
import com.qf.service.TestAdminService;
import com.qf.service.TestDoctorService;
import com.qf.service.TestMedicineService;
import com.qf.service.TestPatientService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TestController {
    @Autowired
    TestAdminService testAdminService;
    @Autowired
    TestDoctorService testDoctorService;
    @Autowired
    TestMedicineService testMedicineService;
    @Autowired
    TestPatientService testPatientService;
    @GetMapping("/admin")
    public List<Test> admin(){
        List<Test> admin = testAdminService.admin();
        return admin;
    }

    @GetMapping("/doctor")
    public List<Test> doctor(){

        List<Test> doctor = testDoctorService.doctor();
        return doctor;
    }
    @GetMapping("/medicine")
    public List<Test> medicine(){
        List<Test> medicine = testMedicineService.medicine();
        return medicine;
    }
    @GetMapping("/patient")
    public List<Test> patient(){
        List<Test> patient = testPatientService.patient();
        return patient;
    }

}
